<template>
  <div class='board'>
    <Film-title
      title="每日热映口碑榜"
      left-arrow
    >
    </Film-title>
    <div
      class="board-movie"
      type="7"
    >
      <div class="description">
        <h2>每日热映口碑榜</h2>
        <div class="date">
          <div class="number">2021-04-21 已更新</div>
        </div>
        <div>《每日热映口碑榜》——将昨日国内热映的影片，按照评分从高到低排列，取前10名，每天上午10点更新，相关数据来源于“猫眼专业版”及“猫眼电影库”。</div>
      </div>
      <div
        class="board-card"
        v-for="board in boards"
        :key="board.id"
      >
        <a
          href="/movie/243?_v_=yes"
          class="link link-holder"
        ></a>
        <div class="cover"><i class="rank-bg rank-bg-top"></i><i class="rank-number">{{board.id}}</i><img
            class="img"
            :src="board.imgsrc"
            :alt="board.name"
          ></div>
        <div class="info">
          <h3 class="title">{{board.name}}</h3>
          <div class="actors">{{board.actor}}</div>
          <div class="cat"></div>
          <div class="date">{{board.time}}</div>
        </div>
        <div class="right extra-right">
          <div>
            <span class="number">{{board.score}}</span>
            <span>分</span>
          </div>
          <a
            href="/app?_v_=yes&amp;pageId=100396&amp;actionId=wish_7"
            class="link btn btn-reverse"
          > <i
              :class="['iconfont','icon-xinaixin-fuben','ai']"
              @click.prevent="changeLike"
            ></i>
          </a>
        </div>
      </div>
    </div>
    <div class="footer-misc">
      <div class="copyright"><span><span data-reactid=".7q1ujk5f9k.6.0.0.0.0">© 猫眼电影 客服电话:</span><a>1010-5335</a></span></div>
      <div class="f-all">
        <p class="icp"><a
            href="http://www.miibeian.gov.cn"
            class="link"
            target="_blank"
          ><span>京ICP备16022489号-1</span></a><span>&nbsp;</span><a
            href="http://www.beian.gov.cn"
            class="link"
            target="_blank"
          ><span>京公网安备11010502030881号</span></a></p>
        <p class="sankuai"><a
            href="javascript:void(0)"
            class="link"
          ><span>北京猫眼文化传媒有限公司</span></a></p>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data: () => ({
    boards: []
  }),
  created() {
    this.getBang()
  },
  methods: {
    async getBang() {
      const res = await this.$http.getBang()
      // console.log(res)
      this.boards = res.data.message
    }
  }
}
</script>
<style lang="scss" scoped>
.board {
  .description {
    padding: 15px 6px;
    color: #666;
    h2 {
      font-size: 17px;
      color: #000;
      font-weight: 600;
    }
    .date {
      margin: 15px 0;
      .number {
        font-size: 13px;
        margin-right: 2.5px;
        color: #ff9900;
      }
    }
  }
  .link-holder {
    display: block;
    width: 100%;
    height: 110px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
  }
  .board-card {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 10px;
    border-top: 1px solid #ccc;
    .cover {
      .rank-bg {
        width: 0;
        height: 0;
        position: absolute;
        border-top: 27px solid #ff9900;
        border-right: 27px solid transparent;
      }
      .rank-number {
        display: block;
        text-align: center;
        width: 13.5px;
        position: absolute;
        color: #fff;
      }
      .img {
        width: 64px;
        height: 90px;
        border: 0;
        display: inline-block;
        background: #f5f5f5
          url()
          no-repeat 50%;
        background-size: 50%;
      }
    }
    .info {
      font-size: 13px;
      color: #666;
      margin-left: -40px;
      .title {
        font-size: 17px;
        color: #000;
        margin: 7.5px 0;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
        font-weight: 600;
      }
      .actors {
        height: 19px;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
        width: 178px;
      }
    }
    .extra-right {
      text-align: right;
      color: #ff9900;
      font-size: 13px;
      .number {
        font-size: 17px;
        margin: 0;
      }
      .btn-reverse {
        margin-top: 0.2rem;
        font-size: 0.26rem;
        i {
          color: #e54847;
          font-size: 1em;
          line-height: 1em;
          display: inline;
          vertical-align: middle;
        }
      }
      .btn {
        background: #fff;
      }
    }
  }
  .btn-reverse {
    color: #e54847 !important;
    border: 1px solid #e54847;
    background-color: transparent !important;
  }
  .btn {
    color: white;
    cursor: pointer;
    font-size: 16px;
    padding: 0.13rem 0.24rem;
    display: inline-block;
    text-align: center;
    border-radius: 4px;
    line-height: 20px;
    width: 40px;
    background: #e54847;
    color: #fff;
    text-decoration: none;
  }
  .footer-misc {
    text-align: center;
    font-size: 14px;
    .copyright a {
      color: #df3434;
      text-decoration: underline;
    }
    .f-all {
      font-size: 12px;
      color: #9e9e9e;
      .icp {
        margin: 14px 0;
      }
    }
  }
}
</style>
